//
// Created by xili on 2024/8/27 16:05.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int scoreOfString(string s) {
        int ans = 0;
        int n = s.size();
        for (int i = 1; i < n; i++) {
            ans += abs(s[i] - s[i - 1]);
        }
        return ans;
    }
};